#ifndef __FLAG_H__
#define __FLAG_H__

#include <vector>
#include "Vector4.h"
#include "Point.h"
#include "BezierCurve.h"

static const int resolution=10;

class Flag{
 public:
 Flag(BezierCurve b1, BezierCurve b2, BezierCurve b3, BezierCurve b4) : b1(b1), b2(b2), b3(b3), b4(b4)
	{
		for (double i=0; i<resolution; i++) {
			for (double j=0; j<resolution; j++) {	
				BezierCurve curve(b1.evaluate(i/resolution), b2.evaluate(i/resolution), b3.evaluate(i/resolution), b4.evaluate(i/resolution));
				vertices.push_back(100*curve.evaluate(j/resolution));
				textureCoordinates.push_back(curve.evaluate(1.0/j));
			}
		}
	}
	
	void wave() {

	}

	std::vector<Vector4> vertices;
	std::vector<Vector4> textureCoordinates;

 private:
	BezierCurve b1,b2,b3,b4;
};



#endif
